#pragma once
#include "GameObject3D.h"
#include "HavokWorld.h"



// a renderable gameobject that also has a physics object attached, for use with Havok
class PhysicsObject
	: public GameObject3D
{
public:
	PhysicsObject(void);
	virtual ~PhysicsObject(void);
	hkpRigidBody* havokRigidBody;
	hkpRigidBodyCinfo bodyInfo;

	D3DXVECTOR3 StartingPos;

	virtual void Init();

	virtual void Update();

	virtual D3DXMATRIXA16 GetTransform();

	virtual void AddObjectToSimulation(hkpWorld* theWorld);

	virtual void RemoveObjectFromSimulation(hkpWorld* theWorld);

protected:
	virtual void CreateGeometry()=0; // init our havok geometry
	virtual void CreatePhysicsObject()=0; // init our havok shape

	hkpShape* havokShape;
};

